package com.fate.feign.hystrix;

import com.alibaba.fastjson.JSON;
import com.fate.domain.Sku;
import com.fate.feign.OrderProductFeign;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Component;

import java.util.HashMap;
import java.util.List;
import java.util.Map;

@Component
@Slf4j
public class OrderProductFeignHystrix implements OrderProductFeign {
    /**
     * 远程调用根据skuIds查询sku集合
     *
     * @param skuIds
     * @return
     */
    @Override
    public List<Sku> getSkuListByIds(List<Long> skuIds) {
        log.error("远程调用根据skuIds查询sku集合失败，skuIds为{}", JSON.toJSONString(skuIds));
        return null;
    }
    /**
     * 远程调用修改库存
     *
     * @param map
     */
    @Override
    public void changeStock(HashMap<String, Map<Long, Integer>> map) {
        log.error("远程调用修改库存失败，map为{}", JSON.toJSONString(map));
    }
}
